package com.ddyx.rest;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ddyx.service.IOperateService;
import com.ddyx.util.RequestForm;
import com.ddyx.util.ResponseForm;

/**
 * 门店获取经营统计数据
 */
@Controller
@RequestMapping("/stat")
public class ManagerController {

	@Resource
	IOperateService iOperateService;

	/**
	 *	获取页面顶部基础数据
	 */
	@ResponseBody
	@RequestMapping(value = "getManagerTopData", method = RequestMethod.POST)
	public ResponseForm getManagerTopData(@RequestBody RequestForm param) {
		return iOperateService.getManagerTopData(param);
	}
	/**
	 *	7日/30日 的数据统计
	 */
	@ResponseBody
	@RequestMapping(value = "getManagerCircleVisitorData", method = RequestMethod.POST)
	public ResponseForm getManagerCircleVisitorData(@RequestBody RequestForm param) {
		return iOperateService.getManagerCircleVisitorData(param);
	}
	
	/**
	 *	访客的数据统计
	 */
	@ResponseBody
	@RequestMapping(value = "getManagerVisitorData",method = RequestMethod.POST)
	public ResponseForm getManagerVisitorData(@RequestBody RequestForm param) {
		return iOperateService.getManagerVisitorData(param);
	}
	
	/**
	 *	商品数据统计
	 */
	@ResponseBody
	@RequestMapping(value = "getManagerProductData" , method = RequestMethod.POST)
	public ResponseForm getManagerProductData(@RequestBody RequestForm param) {
		return iOperateService.getManagerProductData(param);
	}
	
	/**
	 *	客户数据统计
	 */
	@ResponseBody
	@RequestMapping(value = "getManagerCusotmerData",method = RequestMethod.POST)
	public ResponseForm getManagerCusotmerData(@RequestBody RequestForm param) {
		return iOperateService.getManagerCusotmerData(param);
	}
}
